package com.ruoyi.product.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 商品对象 jy_store_product
 *
 * @author ruoyi
 * @date 2021-11-22
 */
@ApiModel
public class StoreProduct extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 门店id */
    @Excel(name = "门店id")
    private Long storeId;

    /** 门店名称 */
    @Excel(name = "门店名称")
    private String storeName;

    private String adCode;
    private String adName;
    /** 省名称 */
    @Excel(name = "省名称")
    private String provinceName;

    /** 省编码 */
    @Excel(name = "省编码")
    private String provinceCode;

    /** 市名称 */
    @Excel(name = "市名称")
    @ApiModelProperty(value = "市名称")
    private String cityName;

    /** 市编码 */
    @Excel(name = "市编码")
    private String cityCode;

    /** 纬度 */
    @Excel(name = "纬度")
    private String latitude;

    /** 经度 */
    @Excel(name = "经度")
    private String longitude;

    /** geo码 */
    @Excel(name = "geo码")
    private String geoCode;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 商品主图 */
    @Excel(name = "商品主图")
    private String productImage;

    /** 项目详情 */
    @Excel(name = "项目详情")
    private String itemDetail;

    /** 图文详情id */
    @Excel(name = "图文详情id")
    private Long infoId;

    /** 分类id */
    @Excel(name = "分类id")
    private Long classifyId;

    /** 顶级分类ID */
    private Long classifyParentId;
    /** 团购价格 */
    @Excel(name = "团购价格")
    private BigDecimal price;

    /** 门店价格 */
    @Excel(name = "门店价格")
    private BigDecimal storePrice;

    /** 自动下架时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "自动下架时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date offautoTime;

    /** 自动上架时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "自动上架时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date onautoTime;

    /** 排序 */
    @Excel(name = "排序")
    private Long sort;

    /** 销量 */
    @Excel(name = "销量")
    private Long salesNum;

    /** 虚拟销量 */
    @Excel(name = "虚拟销量")
    private Long fictiNum;

    /** 是否上架 */
    @Excel(name = "是否上架")
    private String state;

    /** 下架时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下架时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date offTime;

    /** 下架人 */
    @Excel(name = "下架人")
    private Long offUser;

    /** 下架人来源 */
    @Excel(name = "下架人来源")
    private String offUserType;

    /** 是否热卖 */
    @Excel(name = "是否热卖")
    private String hotState;

    /** 是否固定有效期 */
    @Excel(name = "是否固定有效期")
    private String fixedTimeState;

    /** 可使用开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "可使用开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useStartTime;

    /** 可使用结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "可使用结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date useEndTime;

    /** 不可用时间 */
    @Excel(name = "不可用时间")
    private String disabledDate;

    /** 有效期天数 */
    @Excel(name = "有效期天数")
    private Long validDay;

    /** 提前预约数字 */
    @Excel(name = "提前预约数字")
    private Long appoinNum;

    /** 提前预约单位天或小时 */
    @Excel(name = "提前预约单位天或小时")
    private String appoinUnit;

    /** 适用人数 */
    @Excel(name = "适用人数")
    private Long peopleNum;

    /** 适用人群 */
    @Excel(name = "适用人群")
    private String peopleRight;

    /** 规则提醒 */
    @Excel(name = "规则提醒")
    private String ruleReminder;

    /** 温馨提示 */
    @Excel(name = "温馨提示")
    private String reminder;

    /** 商家服务 */
    @Excel(name = "商家服务")
    private String service;

    /** 快照id */
    @Excel(name = "快照id")
    private Long productBackId;

    /** 商家新人优惠最大金额 */
    @Excel(name = "商家新人优惠最大金额")
    private BigDecimal couponsMaxNewUse;

    /** 商家优惠最大金额 */
    @Excel(name = "商家优惠最大金额")
    private BigDecimal couponsMaxAll;

    private Integer commentCount;

    private String newUserState;

    private String classifyName;

    private String isVip;

    private BigDecimal vipPrice;

    //核销次数
    private Long writeOffNum;

    //商店和门店关联表id
    private Long storeProductJointId;

//    @TableField(exist = false)
//    private Integer afterSaleStatus;

    public String getClassifyName() {
        return classifyName;
    }

    public void setClassifyName(String classifyName) {
        this.classifyName = classifyName;
    }

    public String getIsVip() {
        return isVip;
    }
    public void setIsVip(String isVip) {
        this.isVip = isVip;
    }

    public void setVipPrice(BigDecimal vipPrice)
    {
        this.vipPrice = vipPrice;
    }

    public BigDecimal getVipPrice()
    {
        return vipPrice;
    }

    public Long getWriteOffNum() {
        return writeOffNum;
    }

    public void setWriteOffNum(Long writeOffNum) {
        this.writeOffNum = writeOffNum;
    }

    public String getNewUserState() {
        return newUserState;
    }

    public void setNewUserState(String newUserState) {
        this.newUserState = newUserState;
    }

    public Long getClassifyParentId() {
        return classifyParentId;
    }

    public void setClassifyParentId(Long classifyParentId) {
        this.classifyParentId = classifyParentId;
    }

    public Integer getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(Integer commentCount) {
        this.commentCount = commentCount;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setStoreId(Long storeId)
    {
        this.storeId = storeId;
    }

    public Long getStoreId()
    {
        return storeId;
    }
    public void setStoreName(String storeName)
    {
        this.storeName = storeName;
    }

    public String getStoreName()
    {
        return storeName;
    }
    public void setProvinceName(String provinceName)
    {
        this.provinceName = provinceName;
    }

    public String getProvinceName()
    {
        return provinceName;
    }
    public void setProvinceCode(String provinceCode)
    {
        this.provinceCode = provinceCode;
    }

    public String getProvinceCode()
    {
        return provinceCode;
    }
    public void setCityName(String cityName)
    {
        this.cityName = cityName;
    }

    public String getCityName()
    {
        return cityName;
    }
    public void setCityCode(String cityCode)
    {
        this.cityCode = cityCode;
    }

    public String getCityCode()
    {
        return cityCode;
    }
    public void setLatitude(String latitude)
    {
        this.latitude = latitude;
    }

    public String getLatitude()
    {
        return latitude;
    }
    public void setLongitude(String longitude)
    {
        this.longitude = longitude;
    }

    public String getLongitude()
    {
        return longitude;
    }
    public void setGeoCode(String geoCode)
    {
        this.geoCode = geoCode;
    }

    public String getGeoCode()
    {
        return geoCode;
    }
    public void setProductName(String productName)
    {
        this.productName = productName;
    }

    public String getProductName()
    {
        return productName;
    }
    public void setProductImage(String productImage)
    {
        this.productImage = productImage;
    }

    public String getProductImage()
    {
        return productImage;
    }
    public void setItemDetail(String itemDetail)
    {
        this.itemDetail = itemDetail;
    }

    public String getItemDetail()
    {
        return itemDetail;
    }
    public void setInfoId(Long infoId)
    {
        this.infoId = infoId;
    }

    public Long getInfoId()
    {
        return infoId;
    }
    public void setClassifyId(Long classifyId)
    {
        this.classifyId = classifyId;
    }

    public Long getClassifyId()
    {
        return classifyId;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setStorePrice(BigDecimal storePrice)
    {
        this.storePrice = storePrice;
    }

    public BigDecimal getStorePrice()
    {
        return storePrice;
    }
    public void setOffautoTime(Date offautoTime)
    {
        this.offautoTime = offautoTime;
    }

    public Date getOffautoTime()
    {
        return offautoTime;
    }
    public void setOnautoTime(Date onautoTime)
    {
        this.onautoTime = onautoTime;
    }

    public Date getOnautoTime()
    {
        return onautoTime;
    }
    public void setSort(Long sort)
    {
        this.sort = sort;
    }

    public Long getSort()
    {
        return sort;
    }
    public void setSalesNum(Long salesNum)
    {
        this.salesNum = salesNum;
    }

    public Long getSalesNum()
    {
        return salesNum;
    }
    public Long getSalesNumShow(){
        if(salesNum==null){
            salesNum = 0L;
        }
        if(fictiNum==null){
            fictiNum = 0L;
        }
        return salesNum + fictiNum;
//        if(null!=salesNum&&null!=fictiNum){
//            if(salesNum>fictiNum){
//                return salesNum;
//            }else{
//                return fictiNum;
//            }
//        }
//        return null;

    }
    public void setFictiNum(Long fictiNum)
    {
        this.fictiNum = fictiNum;
    }

    public Long getFictiNum()
    {
        return fictiNum;
    }
    public void setState(String state)
    {
        this.state = state;
    }

    public String getState()
    {
        return state;
    }
    public void setOffTime(Date offTime)
    {
        this.offTime = offTime;
    }

    public Date getOffTime()
    {
        return offTime;
    }
    public void setOffUser(Long offUser)
    {
        this.offUser = offUser;
    }

    public Long getOffUser()
    {
        return offUser;
    }
    public void setOffUserType(String offUserType)
    {
        this.offUserType = offUserType;
    }

    public String getOffUserType()
    {
        return offUserType;
    }
    public void setHotState(String hotState)
    {
        this.hotState = hotState;
    }

    public String getHotState()
    {
        return hotState;
    }
    public void setFixedTimeState(String fixedTimeState)
    {
        this.fixedTimeState = fixedTimeState;
    }

    public String getFixedTimeState()
    {
        return fixedTimeState;
    }
    public void setUseStartTime(Date useStartTime)
    {
        this.useStartTime = useStartTime;
    }

    public Date getUseStartTime()
    {
        return useStartTime;
    }
    public void setUseEndTime(Date useEndTime)
    {
        this.useEndTime = useEndTime;
    }

    public Date getUseEndTime()
    {
        return useEndTime;
    }
    public void setDisabledDate(String disabledDate)
    {
        this.disabledDate = disabledDate;
    }

    public String getDisabledDate()
    {
        return disabledDate;
    }
    public void setValidDay(Long validDay)
    {
        this.validDay = validDay;
    }

    public Long getValidDay()
    {
        return validDay;
    }
    public void setAppoinNum(Long appoinNum)
    {
        this.appoinNum = appoinNum;
    }

    public Long getAppoinNum()
    {
        return appoinNum;
    }
    public void setAppoinUnit(String appoinUnit)
    {
        this.appoinUnit = appoinUnit;
    }

    public String getAppoinUnit()
    {
        return appoinUnit;
    }
    public void setPeopleNum(Long peopleNum)
    {
        this.peopleNum = peopleNum;
    }

    public Long getPeopleNum()
    {
        return peopleNum;
    }
    public void setPeopleRight(String peopleRight)
    {
        this.peopleRight = peopleRight;
    }

    public String getPeopleRight()
    {
        return peopleRight;
    }
    public void setRuleReminder(String ruleReminder)
    {
        this.ruleReminder = ruleReminder;
    }

    public String getRuleReminder()
    {
        return ruleReminder;
    }
    public void setReminder(String reminder)
    {
        this.reminder = reminder;
    }

    public String getReminder()
    {
        return reminder;
    }
    public void setService(String service)
    {
        this.service = service;
    }

    public String getService()
    {
        return service;
    }
    public void setProductBackId(Long productBackId)
    {
        this.productBackId = productBackId;
    }

    public Long getProductBackId()
    {
        return productBackId;
    }
    public void setCouponsMaxNewUse(BigDecimal couponsMaxNewUse)
    {
        this.couponsMaxNewUse = couponsMaxNewUse;
    }

    public BigDecimal getCouponsMaxNewUse()
    {
        return couponsMaxNewUse;
    }
    public void setCouponsMaxAll(BigDecimal couponsMaxAll)
    {
        this.couponsMaxAll = couponsMaxAll;
    }

    public BigDecimal getCouponsMaxAll()
    {
        return couponsMaxAll;
    }

    public String getAdCode() {
        return adCode;
    }

    public void setAdCode(String adCode) {
        this.adCode = adCode;
    }

    public String getAdName() {
        return adName;
    }

    public void setAdName(String adName) {
        this.adName = adName;
    }

    public Long getStoreProductJointId() {
        return storeProductJointId;
    }
    public void setStoreProductJointId(Long storeProductJointId) {
        this.storeProductJointId = storeProductJointId;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("storeId", getStoreId())
            .append("storeName", getStoreName())
            .append("provinceName", getProvinceName())
            .append("provinceCode", getProvinceCode())
            .append("cityName", getCityName())
            .append("cityCode", getCityCode())
            .append("latitude", getLatitude())
            .append("longitude", getLongitude())
            .append("geoCode", getGeoCode())
            .append("productName", getProductName())
            .append("productImage", getProductImage())
            .append("itemDetail", getItemDetail())
            .append("infoId", getInfoId())
            .append("classifyId", getClassifyId())
            .append("price", getPrice())
            .append("storePrice", getStorePrice())
            .append("offautoTime", getOffautoTime())
            .append("onautoTime", getOnautoTime())
            .append("sort", getSort())
            .append("salesNum", getSalesNum())
            .append("fictiNum", getFictiNum())
            .append("state", getState())
            .append("offTime", getOffTime())
            .append("offUser", getOffUser())
            .append("offUserType", getOffUserType())
            .append("hotState", getHotState())
            .append("fixedTimeState", getFixedTimeState())
            .append("useStartTime", getUseStartTime())
            .append("useEndTime", getUseEndTime())
            .append("disabledDate", getDisabledDate())
            .append("validDay", getValidDay())
            .append("appoinNum", getAppoinNum())
            .append("appoinUnit", getAppoinUnit())
            .append("peopleNum", getPeopleNum())
            .append("peopleRight", getPeopleRight())
            .append("ruleReminder", getRuleReminder())
            .append("reminder", getReminder())
            .append("service", getService())
            .append("productBackId", getProductBackId())
            .append("couponsMaxNewUse", getCouponsMaxNewUse())
            .append("couponsMaxAll", getCouponsMaxAll())
            .append("delState", getDelState())
            .append("delUser", getDelUser())
            .append("delType", getDelType())
            .append("delTime", getDelTime())
            .append("createBy", getCreateBy())
            .append("createType", getCreateType())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateType", getUpdateType())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
